package cn.com.cabinet.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import com.cabinet.web.entity.User;

public interface UserDao extends JpaRepository<User, Long>,JpaSpecificationExecutor<User>{
	
	@Query(nativeQuery=true,value="select * from ict_user limit ?1,?2")
	public List<User> getUser(int page,int limit);
	
	@Query(nativeQuery=true,value="select count(*) from ict_user")
	public int getUserCount();

}
